Class WSClientLibrary

java.lang.Object
com.seclore.fs.ws.client.WSClientLibrary

public class WSClientLibrary extends Object
This class provides methods to deal logger initialization Before any of the method is called, the Client must be initialized by calling the initialize method, else the Client not initialize error will be thrown.
  • Field Details

    • SUPPORTED_EXT_FILE_PATH_NAME

      public static final String SUPPORTED_EXT_FILE_PATH_NAME
      Path of the supported extension configuration file. This path is relative to the application path.
      If application path is provided as null in initialize method, then the current path from where the client is running will be taken as application path.
      If the supported extensions file is not found at the 'application path/config' directory, then the default file will be taken from the WSClient jar file.
      See Also:
    • BASIC_PROTECTION_BUFFER_FILE_EXTN

      public static final String BASIC_PROTECTION_BUFFER_FILE_EXTN
      constant for buffer file for basic protection
      See Also:
    • BASIC_PROTECTION_APPENDED_EXTN

      public static final String BASIC_PROTECTION_APPENDED_EXTN
      constant for basic protection appended extension
      See Also:
    • BUFFER_FILES_PATH

      public static final String BUFFER_FILES_PATH
      Path of the folder containing the buffer files. This path is relative to the application path.
      If application path is provided as null in initialize method, then the current path from where the client is running will be taken as application path.
      If any buffer file is not found at the 'application path/config/templetes' directory, then the default file will be taken from the jar file.
      User may override one or more buffer files by putting it in the 'application/config/templetes' path.
      See Also:
    • MAX_FILE_SIZE_FOR_PROTECTION

      public static final double MAX_FILE_SIZE_FOR_PROTECTION
      See Also:
    • MAX_FILE_SIZE_FOR_PROTECTION_VALUE

      public static final String MAX_FILE_SIZE_FOR_PROTECTION_VALUE
      See Also:
  • Constructor Details

    • WSClientLibrary

      public WSClientLibrary()
  • Method Details

    • initialize

      public static void initialize(ISecloreSDKLogger pLogger, com.seclore.fs.ws.client.config.WSClientLibraryConfig pWSClientLibraryConfig) throws WSClientException
      This method initializes the WSClient environment to perform the file related operations.
      Parameters:
      pLogger - : Logger implementation of ISecloreSDKLogger to be used by SDK for logging.
      pWSClientLibraryConfig -
      Throws:
      WSClientException - The WSClientException thrown by the method in case any configuration file is not found, or not parsed.
    • getSMailLogger

      public static com.seclore.fs.ws.client.mail.utilities.SMailLogger getSMailLogger() throws WSClientException
      Throws:
      WSClientException
    • terminate

      public static void terminate() throws WSClientException
      This method release the resources loaded in the the initialize method.
      Throws:
      WSClientException - Thrown by the method.
    • logInternalInfo

      public static void logInternalInfo(String pMessage)
      Log the requested message at the Info log level.
      Parameters:
      pMessage - Message to be logged.
      Throws:
      WSClientException - Thrown by the method if the WSClient is not initialized.
    • logInternalError

      public static void logInternalError(String pMessage, Throwable pCause)
      Log the requested message at the Error log level.
      Parameters:
      pMessage - Message to be logged.
      Throws:
      WSClientException - Thrown by the method if the WSClient is not initialized
    • logInternalDebug

      public static void logInternalDebug(String pMessage)
      Log the requested message at the Debug log level.
      Parameters:
      pMessage - Message to be logged.
      Throws:
      WSClientException - Thrown by the method if the WSClient is not initialized.
    • logInfo

      public static void logInfo(String pMessage) throws WSClientException
      Log the requested message at the Info log level.
      Parameters:
      pMessage - Message to be logged.
      Throws:
      WSClientException - Thrown by the method if the WSClient is not initialized.
    • logError

      public static void logError(String pMessage, Throwable pCause) throws WSClientException
      Log the requested message at the Error log level.
      Parameters:
      pMessage - Message to be logged.
      Throws:
      WSClientException - Thrown by the method if the WSClient is not initialized
    • logDebug

      public static void logDebug(String pMessage) throws WSClientException
      Log the requested message at the Debug log level.
      Parameters:
      pMessage - Message to be logged.
      Throws:
      WSClientException - Thrown by the method if the WSClient is not initialized.
    • getSecurityProviderManager

      public static com.seclore.fs.ws.client.security.provider.interfaces.ISecurityProviderManagerInterface getSecurityProviderManager()